#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

vector<vector<int>> threeSum(vector<int>& nums) {
    vector<vector<int>> ans;
    sort(nums.begin(), nums.end());
    int i = 0, right = nums.size() - 1;
    while (i < right)
    {
        if (nums[i] > 0)
            break;
        int begin = i + 1, end = right;
        while (begin < end)
        {
            if (nums[begin] + nums[end] + nums[i] < 0)
                ++begin;
            else if (nums[begin] + nums[end] + nums[i] > 0)
                --end;
            else
            {
                ans.push_back({ nums[begin],nums[end],nums[i] });
                ++begin, --end;
                while (begin < end && nums[begin] == nums[begin - 1])
                    ++begin;
                while (begin < end && nums[end] == nums[end + 1])
                    --end;
            }
        }
        ++i;
        while (i <= right && nums[i] == nums[i - 1])
            ++i;
    }
    return ans;
}

void test()
{
    static const char* s[] = { "black", "white", "pink", "violet" };
    const char** ptr[] = { s + 3, s + 2, s + 1, s }, *** p;
    p = ptr;
    ++p;
    printf("%s", **p + 1);
}

void test1()
{
    char s[3][10], (*k)[3], * p;
    //p = s;
    //p = k;
    p = s[0];
    //k = s;
}

bool CheckPermutation(string s1, string s2) {
    if (s1.length() != s2.length())
        return false;
    sort(s1.begin(), s1.end());
    sort(s2.begin(), s2.end());

    return s1 == s2;
}

bool canPermutePalindrome(string s) {
    int hash[128];
    memset(hash, 0, sizeof(hash));
    for (int i = 0; i < s.length(); ++i)
    {
        ++hash[s[i]];
    }
    int count = 0;
    for (int i = 0; i < 128; ++i)
    {
        if (hash[i] % 2 != 0)
            ++count;
        if (count > 1)
            return false;
    }
    return true;
}

int main()
{
    cout << sizeof("ab") << endl;
}